*****************************************************
*** Abandoning the Ground Game? Replication File ****
*** Presidential Studies Quarterly ******************
*** Joshua P. Darr, Louisiana State University ******
*****************************************************


use "Field offices master dataset.dta", clear

encode state, generate(state_numeric)

*************************
*** A note on coding: 
* Variable suffixes correspond to elections.
* 1 = 2004, 2 = 2008, 3 = 2012, 4 = 2016
*************************

*********************************************************
**** Figure 3: County-level office differences table ****
*********************************************************

cd "/Users/jdarr/Dropbox/Research/Field Offices/2016 Paper/Data/Master"

use "Field offices master dataset.dta", clear
encode state, generate(state_numeric)

gen dem_dumfo_diff = dem_dumfo4 - dem_dumfo3

bysort state: egen dem_dumfo_state3 = total(dem_dumfo3)
bysort state: egen dem_dumfo_state4 = total(dem_dumfo4)
bysort state: egen dem_counties_fo_diff = total(dem_dumfo_diff)

keep if bg4==1

bysort state: gen state_keepone = _n
keep if state_keepone==1

egen dem_dumfo_total3 = total(dem_dumfo_state3)
egen dem_dumfo_total4 = total(dem_dumfo_state4)
egen dem_dumfo_diff_total = total(dem_counties_fo_diff)

label variable dem_counties_fo_diff "Difference in # of counties with field offices: 2016 vs. 2012"


** Graph results **
graph hbar dem_counties_fo_diff, over(state) graphregion(col(white)) ytitle("Difference in # of counties with field offices: 2016 vs. 2012") /*
	*/ yscale(range(-30(5)10)) ylabel(-30(5)10) scheme(s2mono)

graph save "Coefplots/Figure 3 - Dem counties FO diff.gph", replace
graph export "Coefplots/Figure 3 - Dem counties FO diff.pdf", replace



*********************************
**** Table 1: 2016 Placement ****
*********************************


** Generate normal vote measure: pct Rep averaged over 2008, 2012, and 2016 ** 
egen rep_nv = rmean(pres_rep_pct2 pres_rep_pct3 pres_rep_pct4)

** Rescale control variables to minimize number of digits **
gen medinc3_rs = medinc3/100000
gen medinc4_rs = medinc4/100000

gen pop3_rs = pop3/1000000
gen pop4_rs = pop4/1000000

gen pop3sq = pop3_rs^2
gen pop4sq = pop4_rs^2

gen rs_medage3_median = medage3
gen rs_medage4 = medage4


gen black_pct4_rs = black_pct4*100
gen hisp_pct4_rs = hisp_pct4*100
gen degree_pct4_rs = pc_degree4*100
gen hsless_pct4_rs = pc_less_hs4*100


** Analysis 1: Controlling for partisan normal vote & MRP ideology **
reg dem_fo4 rep_fo4 rep_nv bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)
estimates store Dem_NV

reg rep_fo4 dem_fo4 rep_nv bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)

estimates store Rep_NV


** For Appendix: MRP ideology **
reg dem_fo4 rep_fo4 mrp_ideology_mean bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master_MRP.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)
reg rep_fo4 dem_fo4 mrp_ideology_mean bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master_MRP.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)


** Definition of swing: change in winner 08 vs. 12 **
gen flip = 0 
replace flip = 1 if pres_rep_pct2 < .5 & pres_rep_pct3 > .5 
replace flip = 1 if pres_rep_pct2 > .5 & pres_rep_pct3 < .5
gen solid_blue = 0 
replace solid_blue = 1 if pres_rep_pct2 < .5 & pres_rep_pct3 <.5  
gen solid_red = 0 
replace solid_red = 1 if pres_rep_pct2 > .5 & pres_rep_pct3 > .5



** Analysis 2: Core and Swing Counties **
reg dem_fo4 rep_fo4 i.flip i.solid_blue bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)

estimates store Dem_solid

reg rep_fo4 dem_fo4 i.flip i.solid_red bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)

estimates store Rep_solid


** Analysis 3: Matching **
reg dem_fo4 flip##c.rep_fo4 solid_red##c.rep_fo4 bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)

estimates store Dem_match

reg rep_fo4 flip##c.dem_fo4 solid_blue##c.dem_fo4 bg4 medage4 pop4_rs pop4sq medinc4_rs black_pct4_rs hisp_pct4 hsless_pct4_rs degree_pct4_rs i.state_numeric
outreg2 using "Placement output/Placement16_Master.doc", drop(i.state_numeric) se dec(3) alpha(0.05) symbol(*)

estimates store Rep_match





***************************************
*** Figure 4: CCES + Field Analyses ***
***************************************

set more off

cd "/Users/jdarr/Dropbox/Research/Field Offices/2016 Paper/Data/Master/"

use "CCES16 with field offices Mar2018.dta", clear

* Generate either and both variables *
gen either_fo = 1 if dem_dumfo4==1 | rep_dumfo4==1
replace either_fo = 0 if either_fo==.

gen both_fo = 1 if dem_dumfo4==1 & rep_dumfo4==1
replace both_fo = 0 if both_fo==.

gen either_fo12 = 1 if dem_dumfo3==1 | rep_dumfo3==1
replace either_fo12 = 0 if either_fo12==.

gen both_fo12 = 1 if dem_dumfo3==1 & rep_dumfo3==1
replace both_fo12 = 0 if both_fo12==.


label define either_fo 0 "No office" 1 "Either campaign's office"
label variable either_fo "Either campaign's office"
label values either_fo either_fo

label define both_fo 0 "No office" 1 "Both campaigns' offices"
label variable both_fo "Both campaigns' offices"
label values both_fo both_fo

label define dem_dumfo3 0 "No Obama office" 1 "Obama office"
label variable dem_dumfo4 "Obama office"
label values dem_dumfo3 dem_dumfo3

label define rep_dumfo3 0 "No Romney office" 1 "Romney office"
label variable rep_dumfo4 "Romney office"
label values rep_dumfo3 rep_dumfo3

label define dem_dumfo4 0 "No Clinton" 1 "Clinton"
label variable dem_dumfo4 "Clinton office"
label values dem_dumfo4 dem_dumfo4

label define rep_dumfo4 0 "No Trump" 1 "Trump"
label variable rep_dumfo4 "Trump office"
label values rep_dumfo4 rep_dumfo4


** Clinton and Trump: Interactions **


* Any contact *
logit contact dem_dumfo4##rep_dumfo4 bg16_politico reg_voter voted_2012 age female black hisp asian race_oth union_current union_former military homeowner bornagain ba_or_more inc_below married, cluster(state)
logit, or
*outreg2 using "Data/Master/Contact output/Contact interaction analyses.doc", se dec(3) alpha(0.05) symbol(*) eform

margins, by(dem_dumfo4 rep_dumfo4) coeflegend post

coefplot , vertical /*
	*/ title("Any contact") xlabel(,labsize(medsmall)) ytitle("Probability of contact")/*
	*/ yscale(range(0 1)) ylabel(0(0.2)1) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) /*
	*/ coeflabels(0.dem_dumfo4#0.rep_dumfo4 = "None" 0.dem_dumfo4#1.rep_dumfo4 = "Trump   only" 1.dem_dumfo4#0.rep_dumfo4 = "Clinton only" 1.dem_dumfo4#1.rep_dumfo4 = "Both", wrap(7)) legend(off)

graph save "Coefplots/Contact_any.gph", replace


* In-person contact *
logit contact_inperson dem_dumfo4##rep_dumfo4 bg16_politico reg_voter voted_2012 age female black hisp asian race_oth union_current union_former military homeowner bornagain ba_or_more inc_below married, cluster(state)
logit, or
*outreg2 using "Data/Master/Contact output/Contact interaction analyses.doc", se dec(3) alpha(0.05) symbol(*) eform

margins, by(dem_dumfo4 rep_dumfo4) post

coefplot , vertical /*
	*/ title("In-person contact") xlabel(,labsize(medsmall)) ytitle("Probability of contact")/*
	*/ yscale(range(0 1)) ylabel(0(0.2)1) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) /*
	*/ coeflabels(0.dem_dumfo4#0.rep_dumfo4 = "None" 0.dem_dumfo4#1.rep_dumfo4 = "Trump   only" 1.dem_dumfo4#0.rep_dumfo4 = "Clinton only" 1.dem_dumfo4#1.rep_dumfo4 = "Both", wrap(7)) legend(off)

graph save "Coefplots/Contact_inperson.gph", replace


* Phone contact *
logit contact_phone dem_dumfo4##rep_dumfo4 bg16_politico reg_voter voted_2012 age female black hisp asian race_oth union_current union_former military homeowner bornagain ba_or_more inc_below married, cluster(state)
logit, or
*outreg2 using "Data/Master/Contact output/Contact interaction analyses.doc", se dec(3) alpha(0.05) symbol(*) eform

margins, by(dem_dumfo4 rep_dumfo4) post

coefplot , vertical /*
	*/ title("Phone contact") xlabel(,labsize(medsmall)) ytitle("Probability of contact")/*
	*/ yscale(range(0 1)) ylabel(0(0.2)1) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) /*
	*/ coeflabels(0.dem_dumfo4#0.rep_dumfo4 = "None" 0.dem_dumfo4#1.rep_dumfo4 = "Trump   only" 1.dem_dumfo4#0.rep_dumfo4 = "Clinton only" 1.dem_dumfo4#1.rep_dumfo4 = "Both", wrap(7)) legend(off)

graph save "Coefplots/Contact_phone.gph", replace


* Email contact *
logit contact_email dem_dumfo4##rep_dumfo4 bg16_politico reg_voter voted_2012 age female black hisp asian race_oth union_current union_former military homeowner bornagain ba_or_more inc_below married, cluster(state)
logit, or
*outreg2 using "Data/Master/Contact output/Contact interaction analyses.doc", se dec(3) alpha(0.05) symbol(*) eform

margins, by(dem_dumfo4 rep_dumfo4) post

coefplot , vertical /*
	*/ title("Email contact") xlabel(,labsize(medsmall)) ytitle("Probability of contact")/*
	*/ yscale(range(0 1)) ylabel(0(0.2)1) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) /*
	*/ coeflabels(0.dem_dumfo4#0.rep_dumfo4 = "None" 0.dem_dumfo4#1.rep_dumfo4 = "Trump   only" 1.dem_dumfo4#0.rep_dumfo4 = "Clinton only" 1.dem_dumfo4#1.rep_dumfo4 = "Both", wrap(7)) legend(off)

graph save "Coefplots/Contact_email.gph", replace


* Mail contact *
logit contact_letter dem_dumfo4##rep_dumfo4 bg16_politico reg_voter voted_2012 age female black hisp asian race_oth union_current union_former military homeowner bornagain ba_or_more inc_below married, cluster(state)
logit, or
*outreg2 using "Data/Master/Contact output/Contact interaction analyses.doc", se dec(3) alpha(0.05) symbol(*) eform

margins, by(dem_dumfo4 rep_dumfo4) post

coefplot , vertical /*
	*/ title("Direct mail contact") xlabel(,labsize(medsmall)) ytitle("Probability of contact")/*
	*/ yscale(range(0 1)) ylabel(0(0.2)1) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) /*
	*/ coeflabels(0.dem_dumfo4#0.rep_dumfo4 = "None" 0.dem_dumfo4#1.rep_dumfo4 = "Trump   only" 1.dem_dumfo4#0.rep_dumfo4 = "Clinton only" 1.dem_dumfo4#1.rep_dumfo4 = "Both", wrap(7)) legend(off)

graph save "Coefplots/Contact_letter.gph", replace



**** Combine 4 plots: neither, both, HRC, Trump ****

graph combine "Coefplots/Contact_any.gph" "Coefplots/Contact_inperson.gph", rows(1) xsize(6) ysize(3)
graph save "Coefplots/Contact_any_inperson.gph", replace

graph combine "Coefplots/Contact_phone.gph" "Coefplots/Contact_email.gph" "Coefplots/Contact_letter.gph", rows(1) xsize(9) ysize(3)
graph save "Coefplots/Contact_types.gph", replace

graph combine "Coefplots/Contact_any_inperson.gph" "Coefplots/Contact_types.gph", rows(2) imargin(zero) graphregion(margin(zero))
graph save "Coefplots/Figure 4.gph", replace
graph export "Coefplots/Figure 4.pdf", replace





************************************
*** Figure 5: Literature Updates ***
************************************

cd "/Users/jdarr/Dropbox/Research/Field Offices/2016 Paper/Data/Master"

use "Field offices master dataset.dta", clear

encode state, generate(state_numeric)


*******************************
*** Masket 2009 update 2016 ***
*******************************

gen dem_diff4 = pres_dem_pct4 - pres_dem_pct3
gen pop_growth_16 = (pop4-pop3)/pop3
gen pop_growth_rs16 = pop_growth_16*100
gen dem_diff_rs4 = dem_diff4*100
gen pres_dem_2p_rs4 = pres_dem_2p4*100
gen pop_rs4 = pop4/1000000
gen inc_median_rs4 = medinc4/1000

* Resize percent measures to 100 *
gen black_pct_rs4 = black_pct4*100
gen hisp_pct_rs4 = hisp_pct4*100
gen pres_dem_2p_rs3 = pres_dem_2p3*100


label variable dem_dumfo4 "Clinton (2016)"
label variable dem_dumfo3 "Obama (2012)"
label variable rep_dumfo4 "Trump (2016)"

reg dem_diff_rs4 dem_dumfo4##dem_dumfo3 unemp_change_15_16 pop_growth_rs16 black_pct4 hisp_pct4 medage4 inc_median_rs4 pop_rs4 pres_dem_2p_rs3 i.state_numeric if bg4==1
*outreg2 using "Effects output/2016 effects M.doc", keep(1.dem_dumfo4 1.dem_dumfo3 1.dem_dumfo4#1.dem_dumfo3 unemp_change_15_16 pop_growth_rs16 black_pct4 hisp_pct4 medage4 inc_median_rs4 pop_rs4 pres_dem_2p_rs3) se dec(3) alpha(0.05) symbol(*)

estimates store M1

reg pres_dem_2p_rs4 dem_dumfo4##rep_dumfo4 unemp_change_15_16 pop_growth_rs16 black_pct4 hisp_pct4 medage4 inc_median_rs4 pop_rs4 pres_dem_2p_rs3 i.state_numeric if bg4==1
*outreg2 using "Effects output/2016 effects M.doc", keep(1.dem_dumfo4 1.rep_dumfo4 1.dem_dumfo4#1.rep_dumfo4 unemp_change_15_16 pop_growth_rs16 black_pct4 hisp_pct4 medage4 inc_median_rs4 pop_rs4 pres_dem_2p_rs3) se dec(3) alpha(0.05) symbol(*)

estimates store M2

coefplot (M1, label(Table 1: Dem. % diff.) msize(small) ciopts(lcolor(black)) mcolor(black)) (M2, label(Table 2: Dem. vote share) msize(small) ciopts(lcolor(gray)) mcolor(gray)), /*
	*/ keep(1.dem_dumfo4 1.dem_dumfo3 1.dem_dumfo4#1.dem_dumfo3 1.rep_dumfo4 1.dem_dumfo4#1.rep_dumfo4) xline(0) title("a) Model: Masket (2009)", size(medium)) ylabel(,labsize(small))/*
	*/ xscale(range(-3 3)) xlabel(-3(1)3) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) coeflabels(, interaction (" x ") wrap(20))

graph save "Coefplots/Masketcoefplot.gph", replace
graph export "Coefplots/Masketcoefplot.pdf", replace





**************************************************
*** Masket, Sides and Vavreck 2016 update 2016 ***
**************************************************

gen dem_fo_cat4 = dem_fo4
replace dem_fo_cat4 = 2 if dem_fo4 >= 2
gen rep_fo_cat4 = rep_fo4
replace rep_fo_cat4 = 2 if rep_fo4 >= 2

gen dem_minus_rep_fo4 = dem_fo4 - rep_fo4
gen neither_fo4 = 0
replace neither_fo4 = 1 if dem_fo4==0 | rep_fo4==0

* Resize percent measures to 100 *
gen hsless_pct_rs4 = pc_less_hs4*100
gen degree_pct_rs4 = pc_degree4*100


label variable dem_fo_cat4 "# of Clinton offices (0, 1, 2)"
label variable rep_fo_cat4 "# of Trump offices (0, 1, 2)"
label variable dem_minus_rep_fo4 "Clinton offices - Trump offices"
label variable neither_fo4 "Neither Clinton nor Trump office"


reg pres_dem_2p_rs4 dem_dumfo4##rep_dumfo4 pop_growth_rs16 pop_rs4 black_pct_rs4 hisp_pct_rs4 popunder18 inc_median_rs4 pres_dem_2p_rs3 hsless_pct_rs4 degree_pct_rs4 unemp_change_15_16 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects MSV.doc", keep(1.dem_dumfo4 1.rep_dumfo4 1.dem_dumfo4#1.rep_dumfo4 pop_growth_rs16 pop_rs4 black_pct_rs4 hisp_pct_rs4 popunder18 inc_median_rs4 pres_dem_2p_rs3 hsless_pct_rs4 degree_pct_rs4 unemp_change_15_16) se dec(3) alpha(0.05) symbol(*)

estimates store MSV_C1

reg pres_dem_2p_rs4 dem_fo_cat4 rep_fo_cat4 pop_growth_rs16 pop_rs4 black_pct_rs4 hisp_pct_rs4 popunder18 inc_median_rs4 pres_dem_2p_rs3 hsless_pct_rs4 degree_pct_rs4 unemp_change_15_16 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects MSV.doc", keep(dem_fo_cat4 rep_fo_cat4 pop_growth_rs16 pop_rs4 black_pct_rs4 hisp_pct_rs4 popunder18 inc_median_rs4 pres_dem_2p_rs3 hsless_pct_rs4 degree_pct_rs4 unemp_change_15_16) se dec(3) alpha(0.05) symbol(*)

estimates store MSV_C2

reg pres_dem_2p_rs4 dem_minus_rep_fo4 neither_fo4 pop_growth_rs16 pop_rs4 black_pct_rs4 hisp_pct_rs4 popunder18 inc_median_rs4 pres_dem_2p_rs3 hsless_pct_rs4 degree_pct_rs4 unemp_change_15_16 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects MSV.doc", keep(dem_minus_rep_fo4 neither_fo4 pop_growth_rs16 pop_rs4 black_pct_rs4 hisp_pct_rs4 popunder18 inc_median_rs4 pres_dem_2p_rs3 hsless_pct_rs4 degree_pct_rs4 unemp_change_15_16) se dec(3) alpha(0.05) symbol(*)

estimates store MSV_C3


coefplot (MSV_C1, label(Model 1) msize(small) ciopts(lcolor(black)) mcolor(black)) (MSV_C2, label(Model 2) msize(small) ciopts(lcolor(gray)) mcolor(gray)) (MSV_C3, label(Model 3) msize(small) ciopts(lcolor(gs12)) mcolor(gs12)),/*
	*/ keep(1.dem_dumfo4 1.rep_dumfo4 1.dem_dumfo4#1.rep_dumfo4 dem_fo_cat4 rep_fo_cat4 dem_minus_rep_fo4 neither_fo4) xline(0) title("b) Model: Masket, Sides & Vavreck (2016) - Dem. vote share", size(medium)) ylabel(,labsize(small)) /*
	*/ xscale(range(-3 3)) xlabel(-3(1)3) graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) coeflabels(, interaction (" x ") wrap(20))

graph save "Coefplots/MSVcoefplot.gph", replace
graph export "Coefplots/MSVcoefplot.pdf", replace

	
	

***********************************
*** Weinschenk 2015 replication ***
***********************************

gen total_fo4 = dem_fo4 + rep_fo4
gen pres_turnout_pct4 = pres_turnout4/pop4
gen pres_turnout_pct3 = pres_turnout3/pop3
gen pres_turnout_pct_rs4 = pres_turnout_pct4*100
gen pres_turnout_pct_rs3 = pres_turnout_pct3*100

label variable total_fo4 "Total offices (2016)"
label variable dem_fo4 "# of Clinton offices"
label variable rep_fo4 "# of Trump offices"

reg pres_turnout_pct_rs4 total_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects W.doc", keep(total_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4) se dec(3) alpha(0.05) symbol(*)

estimates store W1


reg pres_turnout_pct_rs4 dem_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects W.doc", keep(dem_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4) se dec(3) alpha(0.05) symbol(*)

estimates store W2


reg pres_turnout_pct_rs4 rep_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects W.doc", keep(rep_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4) se dec(3) alpha(0.05) symbol(*)

estimates store W3


reg pres_turnout_pct_rs4 dem_fo4 rep_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4 i.state_numeric, vce(cluster state_numeric)
*outreg2 using "Effects output/2016 effects W.doc", keep(dem_fo4 rep_fo4 pres_turnout_pct_rs3 medage4 inc_median_rs4 black_pct_rs4 hisp_pct_rs4 degree_pct_rs4) se dec(3) alpha(0.05) symbol(*)

estimates store W4


coefplot (W1, label(Model 1) msize(small) ciopts(lcolor(black)) mcolor(black)) (W2, label(Model 2) msize(small) ciopts(lcolor(gray)) mcolor(gray)) (W3, label(Model 3) msize(small) ciopts(lcolor(gs12)) mcolor(gs12)) (W4, label(Model 4) msize(small) ciopts(lcolor(dimgray)) mcolor(dimgray)),/*
	*/ keep(total_fo4 dem_fo4 rep_fo4) xline(0) title("c) Model: Weinschenk (2015) - Turnout", size(medium)) ylabel(,labsize(medsmall)) xscale(range(-1 1)) xlabel(-1(0.5)1)/*
	*/ graphregion(color(white)) plotregion(color(white)) bgcolor(white) msize(small) mcolor(gray) coeflabels(, interaction (" x ") wrap(20))

graph save "Coefplots/Weinschenkcoefplot.gph", replace
graph export "Coefplots/Weinschenkcoefplot.pdf", replace


graph combine "Coefplots/Masketcoefplot.gph" "Coefplots/MSVcoefplot.gph" "Coefplots/Weinschenkcoefplot.gph", graphregion(color(white)) col(1) ysize(18) xsize(9)

graph save "Coefplots/Figure 5 - Masket MSV Weinschenk.gph", replace
graph export "Coefplots/Figure 5 - Masket MSV Weinschenk.pdf", replace

